package com.wangjiang.mario.admin.common.util;

import org.mindrot.jbcrypt.BCrypt;

/**
 * 加密校验工具类
 */
public class BcryptUtil {
    public static String EncodeByBcrypt(String originString) {
        return  BCrypt.hashpw(originString, BCrypt.gensalt());
    }
    // 匹配源数据和加密后数据是否一致
    public static Boolean checkpw(String password ,String bcryptString) {
        return BCrypt.checkpw(password, bcryptString);
    }
}
